package com.example.qihuibao.dao

import androidx.room.*
import com.example.qihuibao.bean.RspQueryCanteenInfoBean
import com.example.qihuibao.bean.RspQueryDepartmentInfoBean
import com.example.qihuibao.bean.RspQueryEmployInfoBean
import com.example.qihuibao.bean.RspQueryEnterpriseInfoBean

@Dao
interface EmployInfoDao {
    @Query("SELECT * FROM EmployInfo WHERE EmpID IN (:field_empId)")
    fun queryInEmpID(field_empId: String): RspQueryEmployInfoBean.Employ?

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun save(bean: RspQueryEmployInfoBean.Employ) : Long

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun saveList(users: List<RspQueryEmployInfoBean.Employ>) : List<Long>?

    @Query("SELECT * FROM EmployInfo")
    fun queryAll(): List<RspQueryEmployInfoBean.Employ>?

//    @Delete
//    fun delete(userInfo: UserInfo)
//
    @Query("DELETE FROM EmployInfo")
    fun deleteAll()
}